from typing import List

from motor.core import AgnosticCollection

from common_bind_service.common.dao.base_model_dao import BaseModelDao
from common_bind_service.models.container_config import ContainerMarkConfig
from common_bind_service.utils.db import get_container_mark_config


class ContainerMarkConfigDao(BaseModelDao[ContainerMarkConfig]):

    def get_db(self) -> AgnosticCollection:
        return get_container_mark_config()

    async def get_all(self) -> List[ContainerMarkConfig]:
        """获取所有码值配置规则"""
        query = {}
        return await self.get_by_query(query)



